<template>
  <van-config-provider inset>
    <van-field v-model.number="tel" label="账号" placeholder="请输入手机号" type="number" maxlength="11" />
    <van-field v-model="pwd" label="密码" placeholder="请输入密码" type="password" />
  </van-config-provider>
</template>
<script lang="ts" setup>
import { ConfigProvider as vanConfigProvider, Field as vanField } from 'vant'
import { ref, watch, onMounted } from 'vue'
import useUserStore from '@/store/login-user.ts'
import useChangeShowStore from '@/store/login-changeShow';



const tel = ref()
const pwd = ref()
const store_user = useUserStore()
const store_changeShow = useChangeShowStore()






onMounted(async () => {
  store_changeShow.changeButtonDispaly(true)
  watch(() => [tel.value, pwd.value], () => {

    store_user.userAccount = tel.value
    store_user.userPassword = pwd.value

    if (tel.value && pwd.value) {
      store_changeShow.changeButtonDispaly(false)
    }

    else store_changeShow.changeButtonDispaly(true)
  })



})

</script>
<style scoped lang="scss"></style>